package com.xubeihong.xubeihong;

import java.sql.Timestamp;
import java.time.LocalDateTime;

public class TimeDemo {
    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.of(2024, 10, 22, 22, 55, 30);
        System.out.println(localDateTime);
        Timestamp timestamp = Timestamp.valueOf(localDateTime);
        long milliseconds = timestamp.getTime();
        System.out.println(milliseconds);
    }
}
